package ms.unicorn.ui.figures;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.IFigure;
import org.eclipse.swt.graphics.Color;

public class Theme {
	private IFigure figure;
	private Theme parent;
	private Color foreColor, bkColor, shadowColor = ColorConstants.black;
	private int bkAlpha = 255, shadowAlpha = 128;
	private int arcWidth = 10, arcHeight = 10;
	private boolean shadow = true;
	
	public Theme() {
		
	}
	
	public Theme(Theme parent) {
		this.parent = parent;
	}
	
	public IFigure getFigure() {
		return figure;
	}
	
	public void setFigure(IFigure figure) {
		this.figure = figure;
	}
	
	public Color getForeColor() {
		return foreColor != null ? foreColor : figure != null ? figure.getForegroundColor() : null;
	}
	
	public void setForeColor(Color foreColor) {
		this.foreColor = foreColor;
	}
	
	public Color getBkColor() {
		return bkColor != null ? bkColor : figure != null ? figure.getBackgroundColor() : null;
	}
	
	public void setBkColor(Color bkColor) {
		this.bkColor = bkColor;
	}
	
	public Color getShadowColor() {
		return shadowColor;
	}
	
	public void setShadowColor(Color shadowColor) {
		this.shadowColor = shadowColor;
	}
	
	public int getBkAlpha() {
		return bkAlpha;
	}
	
	public void setBkAlpha(int bkAlpha) {
		this.bkAlpha = bkAlpha;
	}
	
	public int getShadowAlpha() {
		return shadowAlpha;
	}
	
	public void setShadowAlpha(int shadowAlpha) {
		this.shadowAlpha = shadowAlpha;
	}
	
	public int getArcWidth() {
		return arcWidth;
	}
	
	public void setArcWidth(int arcWidth) {
		this.arcWidth = arcWidth;
	}
	
	public int getArcHeight() {
		return arcHeight;
	}
	
	public void setArcHeight(int arcHeight) {
		this.arcHeight = arcHeight;
	}
	
	public boolean isShadow() {
		return shadow;
	}
	
	public void setShadow(boolean shadow) {
		this.shadow = shadow;
	}

	public Theme getParent() {
		return parent;
	}

	public void setParent(Theme parent) {
		this.parent = parent;
	}
}
